<link rel="stylesheet" href="__PUBLIC__/css/global.css"/>
<link rel="stylesheet" href="__PUBLIC__/css/qa.css"/>
<link rel="stylesheet" href="__PUBLIC__/css/responsive.css"/>


<div class="wrap">
    <div class="post-topheader">
        <div class="container">
            <div class="row">
                <div class="col-md-9 col-sm-8 col-xs-12">
                    <span class="post-topheader__title--icon-symbol">
                        问
                    </span>
                    <div class="post-topheader__info">
                        <h1 class="h3 post-topheader__info--title" id="questionTitle" data-id="1010000005841516">
                            <a href="{:U('index/question/index')}">
                               <?php echo $question['title'] ?>
                            </a>
                        </h1>
                        <ul class="taglist--inline inline-block question__title--tag mr10">

                        <?php foreach ($category as  $v) { ?>
                            <li class="tagPopup mb5">
                                <a class="tag" href="{:U('Index/category/index',array('id'=>$v['id']))}" data-toggle="popover" 
                                data-placement="top" data-original-title="git" >
                                    <?php echo $v['cname'] ?>
                                </a>
                            </li>
                        <?php } ?>
                            
                        </ul>
                        <div class="question__author">
                            <a href="{:U('index/personal/index',array('id'=>$question['id']))}" class="mr5">
                                <strong>
                                    <?php echo $question['username'] ?>
                                </strong>
                            </a>
                            <?php echo $question['create_time'] ?> 提问
                            <span class="hidden-xs">
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-4 col-xs-12 hidden-xs">
                    <ul class="post-topheader__side list-unstyled">
                        <li>
                            <button type="button" id="sideFollow" class="btn btn-success btn-sm" data-id="1010000005841516"
                            data-do="follow" data-type="question" data-toggle="tooltip" data-placement="right"
                            title="" data-original-title="关注后将获得更新提醒">
                                关注
                            </button>
                            <strong>
                                <?php echo $question['focus_num'] ?>
                            </strong>
                            关注
                        </li>
                        <li>
                            <button type="button" id="sideBookmark" class="btn btn-default btn-sm"
                            data-id="1010000005841516" data-type="question">
                                收藏
                            </button>
                            <strong id="sideBookmarked">
                                <?php echo $question['fav_num'] ?>
                            </strong>
                            收藏，
                            <strong class="no-stress">
                                <?php echo $question['view'] ?>
                            </strong>
                            浏览
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- end .post-topheader -->
    <div class="container mt30">
        <div class="row">
            <div class="col-xs-12 col-md-9 main">
                <article class="widget-question__item">
                    <div class="post-col">
                        <div class="widget-vote">
                            <button type="button" class="like" data-id="1010000005768307" data-type="question"
                            data-do="like" data-toggle="tooltip" data-placement="top" title="" data-original-title="问题对人有帮助，内容完整，我也想知道答案">
                                <span class="sr-only">
                                    问题对人有帮助，内容完整，我也想知道答案
                                </span>
                            </button>
                            <span class="count">
                                0  
                            </span>
                            <button type="button" class="hate" data-id="1010000005768307" data-type="question"
                            data-do="hate" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="问题没有实际价值，缺少关键内容，没有改进余地">
                                <span class="sr-only">
                                    问题没有实际价值，缺少关键内容，没有改进余地
                                </span>
                            </button>
                        </div>
                        <!-- end .widget-vote -->
                    </div>
                    <div class="post-offset">
                        <div class="question fmt" data-id="1010000005768307">
                            <?php echo $question['content'] ?>
                        </div>
                        <div class="row">
                            <div class="post-opt col-md-8">
                                <ul class="list-inline mb0">
                                    <li>
                                        <a href="">
                                            <?php echo $question['create_time'] ?>提问
                                        </a>
                                    </li>
                                    <li>
                                        <a href="javascript:void(0);" class="comments" data-id="1010000005768307"
                                        data-target="#comment-1010000005768307">
                                            评论
                                        </a>
                                    </li>
                                    <li class="edit-btn" data-original-title="" title="">
                                        <a class="inviteBtn" href="javascript:;" data-title="express执行mysql删除语句后，刷新页面不更新"
                                        data-url="http://sfau.lt/bNymLn" data-id="1010000005768307">
                                            邀请回答
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="widget-comments hidden" id="comment-1010000005768307" data-id="1010000005768307">
                            <div class="widget-comments__form row">
                                <div class="col-md-12">
                                    请先
                                    <a class="commentLogin" href="javascript:void(0);">
                                        登录
                                    </a>
                                    后评论
                                </div>
                            </div>
                            <!-- /.widget-comments__form -->
                        </div>
                        <!-- /.widget-comments -->
                    </div>
                    <!-- end .post-offset -->
                </article>
                <div class="widget-answers">
                    <div class="btn-group pull-right" role="group">
                        <a href="/q/1010000005768307#answers-title" id="sortby-rank" class="btn btn-default btn-xs active">
                            默认排序
                        </a>
                        <a href="?sort=created#answers-title" id="sortby-created" class="btn btn-default btn-xs">
                            时间排序
                        </a>
                    </div>
                    <h2 class="title h4 mt30 mb20 post-title" id="answers-title">
                        <?php echo $answer_count ?> 个回答
                    </h2>
                    <div>
                        <?php foreach ($answerres as $key => $value) { ?>
                            <article class="clearfix widget-answers__item" id="a-1020000005785785">
                                <div class="post-col">
                                    <div class="widget-vote">
                                        <button type="button" class="like" data-id="1020000005785785" data-type="answer"
                                        data-do="like" data-toggle="tooltip" data-placement="top" title="" data-original-title="答案对人有帮助，有参考价值">
                                            <span class="sr-only">
                                                答案对人有帮助，有参考价值
                                            </span>
                                        </button>
                                        <span class="count">
                                            0
                                        </span>
                                        <button type="button" class="hate" data-id="1020000005785785" data-type="answer"
                                        data-do="hate" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="答案没帮助，是错误的答案，答非所问">
                                            <span class="sr-only">
                                                答案没帮助，是错误的答案，答非所问
                                            </span>
                                        </button>
                                    </div>
                                </div>
                                <div class="post-offset">
                                    <div class="answer fmt" data-id="1020000005785785">
                                        <p>
                                            <?php echo $value['content'] ?>
                                        </p>
                                    </div>
                                    <div class="row answer__info--row">
                                        <div class="post-opt col-md-8 col-sm-8 col-xs-10">
                                            <ul class="list-inline mb0">
                                                <li>
                                                    <a href="">
                                                        <?php echo $answerres[$key]['create_time'] ?>回答
                                                    </a>
                                                    <span class="text-muted">
                                                    </span>
                                                </li>
                                                <li>
                                                    <a href="javascript:void(0);" class="comments" data-id="1020000005785785"
                                                    data-target="#comment-1020000005785785">
                                                        1评论
                                                    </a>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="col-md-2 col-sm-2 col-xs-2 answer__info--author-avatar">
                                            <a class="mr10" href="{:U('index/personal/index')}">
                                                <img class="avatar-32" src="__ROOT__<?php echo $value['face'] ?>"
                                                alt="">
                                            </a>
                                        </div>
                                        <div class="col-md-2 col-sm-2 hidden-xs answer__info--author">
                                            <div class=" answer__info--author-warp">
                                                <a class="answer__info--author-name" title="xiaoqi77" href="{:U('index/personal/index',array('id'=>$value['uid']))}">
                                                    <?php echo $value['username'] ?>
                                                </a>
                                                <span class="answer__info--author-rank">
                                                    52 声望
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="widget-comments hidden" id="comment-1020000005785785" data-id="1020000005785785">
                                        <div class="widget-comments__form row">
                                            <div class="col-md-12">
                                                请先
                                                <a class="commentLogin" href="javascript:void(0);">
                                                    登录
                                                </a>
                                                后评论
                                            </div>
                                        </div>
                                        <!-- /.widget-comments__form -->
                                    </div>
                                    <!-- /.widget-comments -->
                                </div>
                            </article>
                        <?php } ?>
                    </div>
                    




                    
                    <div class="text-center">
                    </div>
                </div>
                <!-- /.widget-answers -->
                <div style="padding-left: 65px;">
                    <h4>
                        撰写答案
                    </h4>
                    <input type="hidden" id="draftId" value="">
                    <input type="hidden" value="1010000005768307" id="questionId">
                    <form action="{:U('index/question/answer')}" method="post" class="editor-wrap">
                        <!-- <div class="editor" id="questionText"> -->
                        <textarea id="" name="answer" class="form-control" rows="4" placeholder="撰写答案..."></textarea>                        
                        <input type="hidden" name="qid" value="<?php echo $_GET['id']; ?>">
                        <!-- </div> -->
                        <div id="answerSubmit" class="mt15 clearfix">
                            <div class="checkbox pull-left">
                                <label>
                                    <input type="checkbox" class="" id="shareToWeibo">
                                    同步到新浪微博
                                </label>
                            </div>
                            <div class="pull-right">
                                <span id="editorStatus" class="hidden text-muted">
                                </span>
                                <a id="dropIt" href="javascript:void(0);" class="mr10 hidden">
                                    [舍弃]
                                </a>
                                <button type="submit" id="answerIt" data-id="1010000005768307" class="btn btn-lg btn-primary ml20">
                                    提交回答
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.main -->
            <div class="col-xs-12 col-md-3 side">
                <div data-type="widget" data-api="/api/bookmarkArchive/hots" data-api-overwrite="/api/bookmarkArchive/1010000005768307/related">
                    <div class="widget-box widget-box--bookmark no-border">
                        <h4 class="widget-box__title">
                            相关收藏夹
                            <a id="widgetBookmarkRefresh" class="userstab pull-right" href="javascript:;">
                                换一组
                            </a>
                        </h4>
                        <ul class="widget-links list-unstyled media">
                            <li class="widget-links__item">
                                <img class="pull-left pattern pattern-13 mr10" src="https://sf-static.b0.upaiyun.com/v-576b52d9/global/img/pattern/4.svg"
                                width="32">
                                <div class="media-body">
                                    <a target="_blank" class="ellipsis mr0" href="/bookmark/1230000002879194">
                                        node
                                    </a>
                                    <p class="mb0">
                                        <span>
                                            9
                                        </span>
                                        个条目
                                        <span class="division">
                                            |
                                        </span>
                                        <span>
                                            0
                                        </span>
                                        人关注
                                    </p>
                                </div>
                            </li>
                            <li class="widget-links__item">
                                <img class="pull-left pattern pattern-11 mr10" src="https://sf-static.b0.upaiyun.com/v-576b52d9/global/img/pattern/8.svg"
                                width="32">
                                <div class="media-body">
                                    <a target="_blank" class="ellipsis mr0" href="/bookmark/1230000003998558">
                                        nodejs
                                    </a>
                                    <p class="mb0">
                                        <span>
                                            240
                                        </span>
                                        个条目
                                        <span class="division">
                                            |
                                        </span>
                                        <span>
                                            0
                                        </span>
                                        人关注
                                    </p>
                                </div>
                            </li>
                            <li class="widget-links__item">
                                <img class="pull-left pattern pattern-11 mr10" src="https://sf-static.b0.upaiyun.com/v-576b52d9/global/img/pattern/9.svg"
                                width="32">
                                <div class="media-body">
                                    <a target="_blank" class="ellipsis mr0" href="/bookmark/1230000003823169">
                                        nodejs
                                    </a>
                                    <p class="mb0">
                                        <span>
                                            15
                                        </span>
                                        个条目
                                        <span class="division">
                                            |
                                        </span>
                                        <span>
                                            0
                                        </span>
                                        人关注
                                    </p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="widget-box no-border">
                    <h2 class="h4 widget-box__title">
                        相似问题
                    </h2>
                    <ul class="widget-links list-unstyled">
                        <li class="widget-links__item">
                            <a title="Node.js Async.js结合node-mysql使用的疑问" href="/q/1010000004180541">
                                Node.js Async.js结合node-mysql使用的疑问
                            </a>
                            <small class="text-muted">
                                1 回答
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="node.js express mysql redis 你们是怎么分层的？" href="/q/1010000004571516">
                                node.js express mysql redis 你们是怎么分层的？
                            </a>
                        </li>
                        <li class="widget-links__item">
                            <a title="node.js用express连接MySQL出现了bug" href="/q/1010000004438635">
                                node.js用express连接MySQL出现了bug
                            </a>
                            <small class="text-muted">
                                3 回答
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="node.js mysql Cannot find module &amp;quot;net&amp;quot; 和 &amp;quot;tls&amp;quot;和&amp;quot;fs&amp;quot; 的问题"
                            href="/q/1010000005762632">
                                node.js mysql Cannot find module "net" 和 "tls"和"fs" 的问题
                            </a>
                            <small class="text-muted">
                                1 回答 | 已解决
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="node.js 导入 mysql出问题" href="/q/1010000004693920">
                                node.js 导入 mysql出问题
                            </a>
                            <small class="text-muted">
                                1 回答
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="node-mysql如何获取某个表中全部字段" href="/q/1010000002726838">
                                node-mysql如何获取某个表中全部字段
                            </a>
                            <small class="text-muted">
                                1 回答 | 已解决
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="nodejs 使用node-mysql 中间件的普通连接与连接池连接哪个好？" href="/q/1010000000355170">
                                nodejs 使用node-mysql 中间件的普通连接与连接池连接哪个好？
                            </a>
                            <small class="text-muted">
                                1 回答
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="node-mysql在查询大数据时，怎么保证不会超时？" href="/q/1010000000455040">
                                node-mysql在查询大数据时，怎么保证不会超时？
                            </a>
                            <small class="text-muted">
                                1 回答
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="node 中的 node-mysql 大家是保持长连接还是短连接？" href="/q/1010000000454504">
                                node 中的 node-mysql 大家是保持长连接还是短连接？
                            </a>
                            <small class="text-muted">
                                3 回答
                            </small>
                        </li>
                        <li class="widget-links__item">
                            <a title="felixge/node-mysql 中.query()函数问题" href="/q/1010000004286883">
                                felixge/node-mysql 中.query()函数问题
                            </a>
                            <small class="text-muted">
                                1 回答 | 已解决
                            </small>
                        </li>
                    </ul>
                </div>
                <div class="widget-share__full" data-url="#" data-shorturl="#">
                    <div style="margin-bottom:10px;">
                        分享扩散：
                    </div>
                    <div class="widget-share-network sharer-0" style="display: block;">
                        <ul class="sn-inline">
                            <li data-network="weibo">
                                <a href="javascript:void(0);" class="entypo-weibo icon-sn-weibo share-1"
                                data-toggle="tooltip" data-placement="top" title="" data-original-title="分享至新浪微博">
                                    新浪微博
                                </a>
                            </li>
                            <li data-network="wechart">
                                <a href="javascript:void(0);" class="entypo-wechart icon-sn-weixin share-2"
                                data-toggle="tooltip" data-placement="top" title="" data-original-title="分享至微信">
                                    微信
                                </a>
                            </li>
                            <li data-network="twitter">
                                <a href="javascript:void(0);" class="entypo-twitter icon-sn-twitter share-3"
                                data-toggle="tooltip" data-placement="top" title="" data-original-title="分享至 Twitter">
                                    Twitter
                                </a>
                            </li>
                            <li data-network="facebook">
                                <a href="javascript:void(0);" class="entypo-facebook icon-sn-facebook share-4"
                                data-toggle="tooltip" data-placement="top" title="" data-original-title="分享至 Facebook">
                                    Facebook
                                </a>
                            </li>
                        </ul>
                    </div>
                    <a type="button" class="btn btn-sm shareMore btn-sn-more" data-toggle="popover"
                    data-placement="top" data-url="#" data-shorturl="#">
                        <span class="icon-sn-dotted" data-original-title="" title="">
                        </span>
                        <strong class="visible-xs-inline">
                            •••
                        </strong>
                    </a>
                </div>
            </div>
            <!-- /.side -->
        </div>
    </div>
</div>